<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
   
    <ui:composition template="/views/_template.xhtml">
        <ui:define name="corpo">
            <h:form>  
                <h:messages style="color: red"/>
                <p:outputLabel style="text-align: right; margin-left: 765px; color: #99a699;" value="Total de registros: #{bancoBean.bancos.size()}" />
                <p:outputLabel value="Bancos" style="border-bottom: 3px solid #C22; text-align: left; font-size: 24px; width: 900px; " />
                <p:dataTable value="#{bancoBean.bancos}" var="banco" emptyMessage="Nenhum registro encontrado!" >
                    <p:column style="text-align: left;" headerText="Nº do Banco" >
                        <h:outputText value="#{banco.numeroBanco}"/>
                    </p:column>
                    <p:column style="text-align: left;" headerText="Nome do Banco" sortBy="#{banco.nomeBanco}" >
                         <h:outputText  value="#{banco.nomeBanco}"/>
                    </p:column>
                    <p:column style="width: 10px;" headerText="Alterar">
                        <center>
                            <h:commandLink action="#{bancoBean.alterar(banco)}">
                                <h:graphicImage library="imagens" name="edit-icon.gif" style="width: 30px; height: 20px;" />
                            </h:commandLink>
                        </center>
                    </p:column>
                    <p:column style="width: 10px;" headerText="Excluir">
                        <center>
                            <h:commandLink action="#{bancoBean.remover(banco)}">
                                <h:graphicImage library="imagens" name="icon_delete.gif" style="width: 30px; height: 20px;" /> 
                            </h:commandLink>
                        </center>
                    </p:column>
                 </p:dataTable><br />
                 <h:commandButton value="Novo" action="/administrador/incluirBanco" />
                <h:commandButton value="Voltar" action="index" immediate="true"/>
            </h:form>   
        </ui:define>
    </ui:composition>
</html>

